/**切换创建时间**/
function custBigExportTime(btn) {
    var data_cliak = $(btn).attr("data-click");
    if(data_cliak === "selft"){
        $("#advance-daterange").removeClass("hidden");
        $("#starttime").val(moment().subtract("days",29).format("YYYY-MM-DD"));
        $("#endtime").val(moment().format("YYYY-MM-DD"));
    }else{
        $("#advance-daterange").addClass("hidden");
        $("#starttime").val('')
        $("#endtime").val('');
    }
    $("#custTime").find("button").each(function () {
        $(this).removeClass("btn-primary");
    });
    $(btn).addClass("btn-primary");
    //动态加载
    //@TODO
    $JuXue.refreshTable("bigEmpRecordsTable");
}
/**切换结算状态**/
function banlceStatus(btn) {
    var data_cliak = $(btn).attr("data-click");
    $("#Banlce").val(data_cliak);
    $("#customeBanlce").find("button").each(function () {
        $(this).removeClass("btn-primary");
    });
    $(btn).addClass("btn-primary");
    //动态加载
    //@TODO
    $JuXue.refreshTable("bigEmpRecordsTable");
}

/**查看此批次的成功导入的客户**/
function viewBigEmpDetail(btn) {
    var batchUuid = $(btn).attr("data-click");
    if (batchUuid == undefined) {$JuXue.n_danger("获取客户详情失败");return;}
    $("#bigEpExport_ids").val(batchUuid);
    $.post(ctx+"bigEpExport/getExportDetail",{},function (r) {
        $("#bigEpExport-detail-div").empty().append(r).modal('show').draggable();
    });
}
/**查看次批次导入失败的客户**/
function viewFaluiBigEmpDetail(btn) {
    var exportUuid = $(btn).attr("data-click");
    if (exportUuid == undefined) {$JuXue.n_danger("获取客户详情失败");return;}
    $("#bigEpExport_ids").val(exportUuid);
    $.post(ctx+"bigEpExport/getExportFalurDetail",{},function (r) {
        $("#bigEpExport-detail-div").empty().append(r).modal('show').draggable();
    });
}

/**导出弹框信息**/
function balanceOver(btn) {
    var epid = $(btn).attr("epid");
    var uuid  = $(btn).attr("uuid");
    if (epid != undefined && uuid != undefined) {
        $("#bigEpExport_ids").val(epid);
        $("#bigEmpBatchUuid").val(uuid);
        $.post(ctx+"bigEpExport/getExportBalance",{},function (r) {
            $("#bigEpExport-detail-div").empty().append(r).modal('show').draggable();
        });
    }else {
        $JuXue.n_warning("获取导出信息失败:1");
    }
}

/**结算完成查看详情**/
function balanceDetail(btn) {
    var epid = $(btn).attr("epid");
    var uuid  = $(btn).attr("uuid");
    if (epid != undefined && uuid != undefined) {
        $("#bigEpExport_ids").val(epid);
        $("#bigEmpBatchUuid").val(uuid);
        $.post(ctx+"bigEpExport/getExportBalancedetail",{},function (r) {
            $("#bigEpExport-detail-div").empty().append(r).modal('show').draggable();
        });
    }else {
        $JuXue.n_warning("获取导出信息失败:1");
    }
}






